#include <stdio.h>
#include <stdlib.h>

#include "fibthread.h"

void* foo(void*);
void* bar(void*);

int main(int argc,char *argv[]){
	fibthread_t foo_t,bar_t;
	
	if(fibthread_create(&foo_t,NULL,foo,NULL)<0){
		printf("Error when creating foo \n");
		exit(EXIT_FAILURE);
	}	
	
	if(fibthread_create(&bar_t,NULL,bar,NULL)<0){
		printf("Error when creating bar \n");
		exit(EXIT_FAILURE);
	}	
	
	printf("It should be working now ... \n");
	
	fibthread_loop();
	
	return 0;
}

void* foo(void* p){
	printf("Hello from foo \n");
	return NULL;
}

void* bar(void* p){
	printf("Hello from bar \n");
	return NULL;
}

